package com.video.moderation.entity;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 为了保证通信的正常，需要实现反序列化以及字段名称一致
 */
@Entity
@Table(name = "chat_message")
@Data
public class ChatMessage implements Serializable {

    private static final long serialVersionUID = 1L;
    
    @Id
    @Column(name = "chat_id")
    private Long chat_id;

    @Column(name = "session_id")
    private String session_id;

    @Column(name = "from_user_id")
    private Long from_user_id;

    @Column(name = "to_user_id")
    private Long to_user_id;

    @Column(name = "contents")
    private String contents;

    @Column(name = "send_time")
    private Date send_time;

}
